import React, { Suspense } from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { RouterProvider } from 'react-router-dom';
import router from './router';
import 'antd/dist/antd'
import { Provider } from 'react-redux';
import reduxStore from './store/reduxIndex'
import { ConfigProvider } from 'antd';
import zh_CN from 'antd/es/locale/zh_CN'
import moment from 'moment';
import 'moment/locale/zh-cn'
import { mockXHR } from './mock/index'


moment.locale('zh-cn')
mockXHR()

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <Provider store={reduxStore}>
    <Suspense fallback={'LOADING...'}>
      <RouterProvider router={router}>
        <ConfigProvider locale={zh_CN}>
          <App></App>
        </ConfigProvider>
      </RouterProvider>
    </Suspense>
  </Provider>
  
);
